package com.fulu.designmode.structural.decorator_pattern;

/**
 * 步骤3： 创建实现了Shape接口的抽象装饰类
 */
public abstract class ShapeDecorator implements Shape {
    // 被装饰的Shape
    protected Shape decoratedShape;

    /**
     * 定义构造器传入要被装饰的shape对象
     * @param decoratedShape
     */
    public ShapeDecorator(Shape decoratedShape) {
        this.decoratedShape = decoratedShape;
    }

    @Override
    public void draw() {
        decoratedShape.draw();
    }
}
